﻿using System;
using Moe.ECamel.Client.Controllers;
using Moe.ECamel.Client.WinForms.Common;

namespace Moe.ECamel.Client.WinForms.Controls
{
	public partial class PaymentsListControl : ECamelUserControl
	{
		private PaymentsController _controller;

		public PaymentsListControl()
		{
			InitializeComponent();
		}

		public void Initialize(PaymentsController controller)
		{
			this._controller = controller;
			this.ListBindingSource.DataSource = _controller.List;			
		}

		public void RefreshView()
		{
			this._controller.RefreshList();
			this.ListBindingSource.CurrencyManager.Refresh();
		}
	}
}
